@(events: List[Event], keyId: String, vCode: String)
<table id="events" class="table table-hover">
    <thead>
        <tr>
            <th>Id</th>
            <th>Name</th>
            <th>Description</th>
            <th>Phone</th>
            <th>Start Date</th>
            <th>End Date</th>
            <th>Action</th>
        </tr>
    </thead>
    <tbody>
        @for(event <- events) {
            <tr data-id="@event.getId()">
                <td>@event.getId()</td>
                <td>@event.getName()</td>
                <td>@event.getDescription()</td>
                <td>@event.getPhone()</td>
                <td>@event.getStartDate().format("dd MMMM yyyy")</td>
                <td>@event.getEndDate().format("dd MMMM yyyy")</td>
                <td class="span6">
                    <button class="btn btn-primary edit-model" data-url="@routes.Events.addEventForm(event.getId())">Edit</button>
                    @if(keyId != null && vCode != null){
                        <button class="btn btn-danger delete-model" data-url="/events/@event.getId()?keyId=@keyId&vCode=@vCode">Delete</button>
                    }
                    <span class="error"></span>
                </td>
            </tr>
        }
    </tbody>
</table>